// 燃气同类对比
var numberFormate = iot.getNumberFormat("0.00");
var factList = ['郑州工厂', '大连工厂', '襄阳工厂', '花都工厂1', '花都工厂2']

dev.action = function (resp, param) {

    var factoryList = iot.list()
    var maxNum=parseInt(Math.random() * 98988333)
    var rate = 1;
    for (var i = 0; i < factList.length; i++) {

        var curNum=parseInt(maxNum - Math.random()*333344)
        maxNum = curNum
        var curData= {
            increase: parseInt(Math.random()*70) + '%',
            name: factList[i],
            rank: i+1,
            useNum: parseInt(maxNum*(rate-0.1*i))
        }
        factoryList.add(curData)
    }


    var jsData = {
        content: factoryList
    };
    resp.setJsData(jsData);

}
